package com.tenbent.product.center.insures.dto;

import com.tenbent.product.base.dto.BaseDto;
import com.tenbent.product.center.insures.bo.SafeguardCategory;
import org.hibernate.validator.constraints.NotEmpty;

/**
 * 保障项目小分类项目
 *
 * Created by ThinkPad on 2017/8/21.
 */
public class SafeguardCategoryDto extends BaseDto {

	/** 保障项目大分类代码 **/
	@NotEmpty(message = "{safeguard.category.type.code.not.empty}")
	private String typeCode;

	/** 保障项目代码 **/
	@NotEmpty(message = "{safeguard.category.code.not.empty}")
	private String categoryCode;

	/** 保障项目内容 **/
	@NotEmpty(message = "{safeguard.category.content.not.empty}")
	private String categoryContent;

	/** 保障额度 **/
	@NotEmpty(message = "{safeguard.category.amount.not.empty}")
	private String categoryAmount;

	public SafeguardCategoryDto() {

	}

	public SafeguardCategoryDto(SafeguardCategory safeguardCategory) {
		super(safeguardCategory);
		setTypeCode(safeguardCategory.getTypeCode());
		setCategoryCode(safeguardCategory.getCategoryCode());
		setCategoryContent(safeguardCategory.getCategoryContent());
		setCategoryAmount(safeguardCategory.getCategoryAmount());
	}

	public SafeguardCategory transToBo() {
		SafeguardCategory safeguardCategory = new SafeguardCategory();
		super.transToBo(safeguardCategory);
		safeguardCategory.setTypeCode(this.getTypeCode());
		safeguardCategory.setCategoryCode(this.getCategoryCode());
		safeguardCategory.setCategoryContent(this.getCategoryContent());
		safeguardCategory.setCategoryAmount(this.getCategoryAmount());
		return safeguardCategory;
	}

	public String getTypeCode() {
		return typeCode;
	}

	public void setTypeCode(String typeCode) {
		this.typeCode = typeCode;
	}

	public String getCategoryCode() {
		return categoryCode;
	}

	public void setCategoryCode(String categoryCode) {
		this.categoryCode = categoryCode;
	}

	public String getCategoryContent() {
		return categoryContent;
	}

	public void setCategoryContent(String categoryContent) {
		this.categoryContent = categoryContent;
	}

	public String getCategoryAmount() {
		return categoryAmount;
	}

	public void setCategoryAmount(String categoryAmount) {
		this.categoryAmount = categoryAmount;
	}
}
